package org.example.controller;

import org.example.dto.GoodsMaterialDto;
import org.example.result.PageResult;
import org.example.result.Result;
import org.example.service.GoodsMaterialService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("goodsMaterial")
public class GoodsMaterialController {

    @Autowired
    private GoodsMaterialService goodsMaterialService;

    @RequestMapping("list")
    public Result list(GoodsMaterialDto goodsMaterialDto) {
        PageResult pageResult = goodsMaterialService.listall(goodsMaterialDto);
        return Result.success(pageResult);
    }
}
